package cn.happy.dao.impl;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Query;

import cn.happy.dao.ITypeDao;
import cn.happy.entity.FilmType;


public class TypeDaoImpl extends BaseHibernateDAO  implements ITypeDao{

	public List<FilmType> getAllType(){
		
		List<FilmType> list = null;
		try {
			Query query = getSession().createQuery("from FilmType");
			list = query.list();
		} catch (HibernateException e) {
			e.printStackTrace();
			throw e;
		} finally{
			this.closeSession();
		}
		return list;
	}

}
